package projectx.web.base;

import java.util.ArrayList;
import java.util.List;

import projectx.util.CollectionUtil;

public class ProjectXListViewHelper extends ProjectXViewHelper {

	private List _list = new ArrayList();

	private int _count = 0;

	private String _radioSelectedRow;

	public void refresh() {
	}

	public String getRadioSelectedRow() {
		return _radioSelectedRow;
	}

	public void setRadioSelectedRow(String selectRow) {
		_radioSelectedRow = selectRow;
	}

	public int getCount() {
		return _count;
	}

	public List getList() {
		return _list;
	}

	public void setList(List list) {
		_list.clear();
		_list.addAll(list);
		int recordCount = CollectionUtil.getSize(_list);
		if (recordCount > requestMaxCount) {
			_count = requestMaxCount;
		} else {
			_count = recordCount;
		}
		if (_count == recordCount - 1) {
			_list.remove(_count);
		}
	}
}
